from sqlalchemy import Column, Integer, String, Text, CheckConstraint
from Model.default import Base

class admins(Base):
    __tablename__ = 'admin_user'
    id=Column(Integer, primary_key=True,default=1,)
    account=Column(String(20),nullable=False,unique=True)
    password=Column(Integer,nullable=False)
    name=Column(Text,nullable=False)
    email=Column(Text,nullable=False)
    phone=Column(Integer,nullable=False)
    age=Column(Integer,nullable=False)
    able=Column(Integer,nullable=False,default=0)
    hash_ps = Column(String(80))
    __table_args__ = (
        CheckConstraint('account LIKE "L_Y_S0%"', name='check_account_prefix'),  # 确保 account字段以 "L_Y_S0" 开头
    )